Eclipse Platform
Pre-release 3.0

org.eclipse.team.ui.synchronize
Class TeamSubscriberParticipantPage

java.lang.Object
  extended byorg.eclipse.team.ui.synchronize.TeamSubscriberParticipantPage
All Implemented Interfaces:
EventListener, IPage, IPageBookViewPage, IPropertyChangeListener

public class TeamSubscriberParticipantPage
extends Object
implements IPageBookViewPage, IPropertyChangeListener

A synchronize view page that works with participants that are subclasses of TeamSubscriberParticipant. It shows changes in the tree or table view and supports navigation, opening, and filtering changes.

Clients can subclass to extend the label decoration or add action bar contributions. For more extensive modifications, clients should create their own custom control.

Since:
3.0

Field Summary
static int[] BOTH_MODE_FILTER
           
static int[] CONFLICTING_MODE_FILTER
           
static int[] INCOMING_MODE_FILTER
           
static int[] OUTGOING_MODE_FILTER
           
 
Constructor Summary
TeamSubscriberParticipantPage(TeamSubscriberParticipant page, ISynchronizeView view, org.eclipse.team.internal.ui.synchronize.sets.SubscriberInput input)
          Constructs a new SynchronizeView.
 
Method Summary
 void collapseAll()
           
 void createControl(Composite parent)
          Creates the SWT control for this page under the given parent control.
 void dispose()
          Disposes of this page.
 Object getAdapter(Class key)
          This method enables "Show In" support for this view
 Control getControl()
          Returns the SWT control for this page.
 org.eclipse.team.internal.ui.synchronize.sets.SubscriberInput getInput()
           
protected  ILabelProvider getLabelProvider()
           
 TeamSubscriberParticipant getParticipant()
           
 IPageSite getSite()
          Returns the site for this page.
 ISynchronizeView getSynchronizeView()
           
 StructuredViewer getViewer()
           
 void init(IPageSite site)
          Initializes this page with the given page site.
 void propertyChange(PropertyChangeEvent event)
          Notification that a property has changed.
 void selectAll()
           
 void setActionBars(IActionBars actionBars)
          Allows the page to make contributions to the given action bars.
 void setFocus()
          Asks this page to take focus within its pagebook view.
 void switchViewerType(int viewerType)
          Toggles between label/tree/table viewers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INCOMING_MODE_FILTER

public static final int[] INCOMING_MODE_FILTER

OUTGOING_MODE_FILTER

public static final int[] OUTGOING_MODE_FILTER

BOTH_MODE_FILTER

public static final int[] BOTH_MODE_FILTER

CONFLICTING_MODE_FILTER

public static final int[] CONFLICTING_MODE_FILTER
Constructor Detail

TeamSubscriberParticipantPage

public TeamSubscriberParticipantPage(TeamSubscriberParticipant page,
                                     ISynchronizeView view,
                                     org.eclipse.team.internal.ui.synchronize.sets.SubscriberInput input)
Constructs a new SynchronizeView.

Method Detail

createControl

public void createControl(Composite parent)
Description copied from interface: IPage
Creates the SWT control for this page under the given parent control.

Clients should not call this method (the workbench calls this method when it needs to, which may be never).

Specified by:
createControl in interface IPage
Parameters:
parent - the parent control

init

public void init(IPageSite site)
          throws PartInitException
Description copied from interface: IPageBookViewPage
Initializes this page with the given page site.

This method is automatically called by the workbench shortly after page construction. It marks the start of the pages's lifecycle. Clients must not call this method.

Specified by:
init in interface IPageBookViewPage
Parameters:
site - the page site
Throws:
PartInitException - if this page was not initialized successfully

switchViewerType

public void switchViewerType(int viewerType)
Toggles between label/tree/table viewers.


getLabelProvider

protected ILabelProvider getLabelProvider()

setFocus

public void setFocus()
Description copied from interface: IPage
Asks this page to take focus within its pagebook view.

Specified by:
setFocus in interface IPage

getViewer

public StructuredViewer getViewer()

dispose

public void dispose()
Description copied from interface: IPage
Disposes of this page.

This is the last method called on the IPage. Implementors should clean up any resources associated with the page.

Callers of this method should ensure that the page's control (if it exists) has been disposed before calling this method. However, for backward compatibilty, implementors must also ensure that the page's control has been disposed before this method returns.

Note that there is no guarantee that createControl() has been called, so the control may never have been created.

Specified by:
dispose in interface IPage

getInput

public org.eclipse.team.internal.ui.synchronize.sets.SubscriberInput getInput()

collapseAll

public void collapseAll()

getAdapter

public Object getAdapter(Class key)
This method enables "Show In" support for this view

See Also:
IAdaptable.getAdapter(java.lang.Class)

selectAll

public void selectAll()

getControl

public Control getControl()
Description copied from interface: IPage
Returns the SWT control for this page.

Specified by:
getControl in interface IPage
Returns:
the SWT control for this page, or null if this page does not have a control

setActionBars

public void setActionBars(IActionBars actionBars)
Description copied from interface: IPage
Allows the page to make contributions to the given action bars. The contributions will be visible when the page is visible.

This method is automatically called shortly after createControl is called

Specified by:
setActionBars in interface IPage
Parameters:
actionBars - the action bars for this page

getSite

public IPageSite getSite()
Description copied from interface: IPageBookViewPage
Returns the site for this page. May be null if no site has been set.

Specified by:
getSite in interface IPageBookViewPage
Returns:
the page site or null

propertyChange

public void propertyChange(PropertyChangeEvent event)
Description copied from interface: IPropertyChangeListener
Notification that a property has changed.

This method gets called when the observed object fires a property change event.

Specified by:
propertyChange in interface IPropertyChangeListener
Parameters:
event - the property change event object describing which property changed and how

getParticipant

public TeamSubscriberParticipant getParticipant()
Returns:
Returns the participant.

getSynchronizeView

public ISynchronizeView getSynchronizeView()
Returns:
Returns the view.

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.